package com.xiaoyu.izf.controller;

import com.xiaoyu.izf.annotation.RequestAuth;
import com.xiaoyu.izf.model.UserInfo;
import com.xiaoyu.izf.model.page.DataTableBean;
import com.xiaoyu.izf.model.page.ParamListBean;
import com.xiaoyu.izf.service.MerchantShopInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 门店
 */
@RestController
@RequestMapping("/shop")
public class MerchantShopController extends BaseController{

    @Autowired
    private MerchantShopInfoService merchantShopInfoService;

    /**
     * 指定商户下的门店列表
     * @param body
     * @return
     */
    @RequestMapping("/list")
    @RequestAuth
    public DataTableBean shopList(@RequestBody String body){
        ParamListBean paramListBean = getParamListBean(body);
        DataTableBean dataTableBean = merchantShopInfoService.shopList(paramListBean);
        return dataTableBean;
    }
}
